package vip.source.pattern.part18.improve;

import com.alibaba.fastjson.JSON;
import org.junit.jupiter.api.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Description: 测试观察者模式
 * @Author: zy
 **/
public class UnitTest {

    private Logger logger = LoggerFactory.getLogger(UnitTest.class);

    @Test
    public void test() {
        LotteryService lotteryService = new LotteryServiceImpl();
        LotteryResult result = lotteryService.draw("18720989281");
        logger.info("测试结果：{}", JSON.toJSONString(result));
    }
}
